package com.wish;

/**
 * @Author: suliucheng
 * @Time: 2021/5/30 10:10
 * @Description: 饿汉式单例模式
 * 私有构造器
 * 静态成员变量
 * 公共的静态获取实例的方法
 */
public class Demo01Singleton {

    private Demo01Singleton() {
    }

    private static final Demo01Singleton instance = new Demo01Singleton();

    public static Demo01Singleton getInstance() {
        return instance;
    }
}
